Optimal. Leaf size=34 \[ \frac {B x}{a}+\frac {(A-B) \sin (c+d x)}{d (a+a \cos (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2814, 2727}
\begin {gather*} \frac {(A-B) \sin (c+d x)}{d (a \cos (c+d x)+a)}+\frac {B x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2814
Rubi steps
\begin {align*} \int \frac {A+B \cos (c+d x)}{a+a \cos (c+d x)} \, dx &=\frac {B x}{a}-(-A+B) \int \frac {1}{a+a \cos (c+d x)} \, dx\\ &=\frac {B x}{a}+\frac {(A-B) \sin (c+d x)}{d (a+a \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(72\) vs. \(2(34)=68\).
time = 0.14, size = 72, normalized size = 2.12 \begin {gather*} \frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (B d x \cos \left (\frac {d x}{2}\right )+B d x \cos \left (c+\frac {d x}{2}\right )+2 (A-B) \sin \left (\frac {d x}{2}\right )\right )}{a d (1+\cos (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 45, normalized size = 1.32
method | result | size |
derivativedivides | \(\frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 B \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(45\) |
default | \(\frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 B \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(45\) |
risch | \(\frac {B x}{a}+\frac {2 i A}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {2 i B}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}\) | \(54\) |
norman | \(\frac {\frac {B x}{a}+\frac {B x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}+\frac {\left (A -B \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\) | \(85\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 73 vs.
\(2 (34) = 68\).
time = 0.49, size = 73, normalized size = 2.15 \begin {gather*} \frac {B {\left (\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + \frac {A \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 43, normalized size = 1.26 \begin {gather*} \frac {B d x \cos \left (d x + c\right ) + B d x + {\left (A - B\right )} \sin \left (d x + c\right )}{a d \cos \left (d x + c\right ) + a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.38, size = 49, normalized size = 1.44 \begin {gather*} \begin {cases} \frac {A \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d} + \frac {B x}{a} - \frac {B \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d} & \text {for}\: d \neq 0 \\\frac {x \left (A + B \cos {\left (c \right )}\right )}{a \cos {\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 43, normalized size = 1.26 \begin {gather*} \frac {\frac {{\left (d x + c\right )} B}{a} + \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.20, size = 30, normalized size = 0.88 \begin {gather*} \frac {\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B\right )}{a}+\frac {B\,d\,x}{a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________